<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
    <title>西京文交所管理端-添加藏品</title>
    <link rel="stylesheet" href="../../static/iconfont/iconfont.css" >
    <link rel="stylesheet" href="../../static/frameset.css" >
</head>
<body>

    <div id="J_wrap" class="m_wrap m_box_v p_form none">
        <div class="m_top">
            <headers v-on:callback="headerHandle" :userobj.sync="userobj"></headers>
        </div>
        <div class="m_content m_flex1 m_box" v-allcheck="check">
            <menunav index="collection" sub="notissued" :navobj.sync="userobj.group_acl"></menunav>
            <div class="container m_flex1 m_over">
                <ul class="breadcrumbs">
                    <li>藏品管理&gt;</li>
                    <li><a href="notissued.html">未发行</a>&gt;</li>
                    <li class="on">设置参数</li>
                </ul>
                <div class="m_title"><h2>设置发行商</h2></div>
                <table class="m_table nostripe">
                    <thead>
                        <tr>
                            <th width="12%">交易号</th>
                            <th width="8%">姓名</th>
                            <th width="10%">主力</th>
                            <th width="6%">手续费</th>
                            <th width="8%">持有量</th>
                            <th width="8%">t+n锁仓</th>
                            <th width="9%">申购量</th>
                            <th width="12%">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="item in list" v-if="list.length > 0">
                            <td class="pdl">
                                <input v-nogetinfo="{fn:getInfoCallback,val:item.pnr_no,cb:$index}" maxlength="12" v-inputnumber class="m_input" type="text" v-model="item.pnr_no" check="[{'type':'require'}]">
                            </td>
                            <td>
                                <input class="m_input" type="text" disabled v-model="item.name" check="[{'type':'require'}]">
                            </td>
                            <td>
                                <select class="m_select" v-model="item.is_main" check="[{'type':'require'}]">
                                    <option value="" hidden selected>请选择</option>
                                    <option value="1">是</option>
                                    <option value="2">否</option>
                                </select>
                            </td>
                            <td>
                                <span class="fee">‰</span><input class="m_input" type="text" v-model="item.r_fee" maxlength="3"  v-inputnumber check="[{'type':'require'}]">
                            </td>
                            <td>
                                <input class="m_input" type="text" v-model="item.total"  v-inputnumber check="[{'type':'require'}]">
                            </td>
                            <td>
                                <input class="m_input" type="text" v-model="item.tn_locked"  v-inputnumber check="[{'type':'require'}]">
                            </td>
                            <td>
                                <input class="m_input" type="text" v-model="item.purchase"  v-inputnumber check="[{'type':'require'}]">
                            </td>
                            <td>
                                <a v-if="$index > 0" href="javascript:void(0);" v-on:click="delete($index)">删除</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="m_box operate">
                    <div class="m_flex1">
                        <button class="m_btn" v-on:click="add">+ 添加账户</button>
                    </div>
                    <div class="info">挂牌量：{{ count ? count : '- -' }}</div>
                </div>
                <div class="m_title"><h2>设置申购</h2></div>
                <table class="m_fmtable">
                    <tbody>
                        <tr>
                            <th>申购方式：</th>
                            <td>
                                <select class="m_select m_medium" v-model="purchase.type" check="[{'type':'require'}]">
                                    <option selected value="1">市值</option>
                                    <option value="2">抢单</option>
                                    <option value="3">市值 + 抢单</option>
                                </select>
                            </td>
                        </tr>
                        <template v-if="purchase.type == 1">
                            <tr>
                                <th>市值模块：</th>
                                <td class="huang">
                                    <template v-for="item in items" >
                                        <div class="m_check {{ item.selected ? 'on' : '' }}" v-on:click="item.selected = !item.selected">{{ item.name }}</div>
                                    </template>
                                </td>
                            </tr>
                            <tr>
                                <th>市值申购量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.wealth_count" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th>最大中签量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.max_assign_count_w" check="[{'type':'require'}]">
                                </td>
                            </tr>
                        </template>
                        <template v-if="purchase.type == 2">
                            <tr>
                                <th>市值模块：</th>
                                <td class="huang">
                                    <template v-for="item in items" >
                                        <div class="m_check {{ item.selected ? 'on' : '' }}" v-on:click="item.selected = !item.selected">{{ item.name }}</div>
                                    </template>
                                </td>
                            </tr>
                            <tr>
                                <th>额外冻结：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.extra_frozen" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th>抢单申购量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.queue_count" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th>最大中签量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.max_assign_count_q" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th>市值约束：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.min_user_wealth" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th>针对新用户：</th>
                                <td>
                                    <select class="m_select m_medium" v-model="purchase.is_new_user" check="[{'type':'require'}]">
                                        <option selected value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                </td>
                            </tr>
                        </template>
                        <template v-if="purchase.type == 3">
                            <tr>
                                <th>市值模块：</th>
                                <td class="huang">
                                    <template v-for="item in items" >
                                        <div class="m_check {{ item.selected ? 'on' : '' }}" v-on:click="item.selected = !item.selected">{{ item.name }}</div>
                                    </template>
                                </td>
                            </tr>
                            <tr>
                                <th>额外冻结：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.extra_frozen" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th class="subtitle" colspan="3">市值</th>
                            </tr>
                            <tr>
                                <th class="pdll">市值申购量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.wealth_count" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th class="pdll">最大中签量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.max_assign_count_w" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th class="subtitle" colspan="3">抢单</th>
                            </tr>
                            <tr>
                                <th class="pdll">抢单申购量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.queue_count" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th class="pdll">最大中签量：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.max_assign_count_q" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th class="pdll">市值约束：</th>
                                <td>
                                    <input class="m_input m_medium" type="text" v-model="purchase.min_user_wealth" check="[{'type':'require'}]">
                                </td>
                            </tr>
                            <tr>
                                <th class="pdll">针对新用户：</th>
                                <td>
                                    <select class="m_select m_medium" v-model="purchase.is_new_user" check="[{'type':'require'}]">
                                        <option selected value="1">是</option>
                                        <option value="2">否</option>
                                    </select>
                                </td>
                            </tr>
                        </template>
                        <tr>
                            <th>申购开始时间：</th>
                            <td>
                                <input onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="m_input m_medium" type="text" v-model="purchase.apply_begin" check="[{'type':'require'}]">
                            </td>
                        </tr>
                        <tr>
                            <th>申购结束时间：</th>
                            <td>
                                <input onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="m_input m_medium" type="text" v-model="purchase.apply_end" check="[{'type':'require'}]">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <div class="submit">
                                    <button class="m_btn" v-on:click="submit">提交</button>
                                    <!-- <button class="m_btn line" v-on:click="cancel">取消</button> -->
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>


    <script src="../../js/plugins/zepto/zepto.min.js"></script>
    <script src="../../js/plugins/vue/vue.min.js"></script>
    <script src="../../js/plugins/seajs/sea.js"></script>
    <script src="../../js/plugins/seajs/seajs-text.js"></script>
    <script src="../../js/plugins/datePicker/WdatePicker.js"></script>

    <script>
        seajs.use( "../../js/page/collection/setting" );
    </script>

</body>
</html>
